package logic

import (
	course "0519/common/proto"
	"0519/rpc/server"
	"context"
)

type ServiceCourse struct {
	course.UnimplementedCourseServer
}

func (s ServiceCourse) UserLogin(ctx context.Context, in *course.UserLoginReq) (*course.UserLoginResp, error) {
	add, err := server.UserLogin(in)
	if err != nil {
		return nil, err
	}
	return add, nil
}

func (s ServiceCourse) CourseAdd(ctx context.Context, in *course.CourseAddReq) (*course.CourseAddResp, error) {
	add, err := server.CourseAdd(in)
	if err != nil {
		return nil, err
	}
	return add, nil
}

func (s ServiceCourse) CourseList(ctx context.Context, in *course.CourseListReq) (*course.CourseListResp, error) {
	add, err := server.CourseList(in)
	if err != nil {
		return nil, err
	}
	return add, nil
}

func (s ServiceCourse) CourseInfo(ctx context.Context, in *course.CourseInfoReq) (*course.CourseInfoResp, error) {
	add, err := server.CourseInfo(in)
	if err != nil {
		return nil, err
	}
	return add, nil
}

func (s ServiceCourse) CourseUpdateState(ctx context.Context, in *course.CourseUpdateStateReq) (*course.CourseUpdateStateResp, error) {
	add, err := server.CourseUpdateState(in)
	if err != nil {
		return nil, err
	}
	return add, nil
}
func (s ServiceCourse) CourseDeleted(ctx context.Context, in *course.CourseDeletedReq) (*course.CourseDeletedResp, error) {
	add, err := server.CourseDeleted(in)
	if err != nil {
		return nil, err
	}
	return add, nil
}
func (s ServiceCourse) CreateDiscountCourse(ctx context.Context, in *course.CreateDiscountCourseReq) (*course.CreateDiscountCourseResp, error) {
	add, err := server.CreateDiscountCourse(in)
	if err != nil {
		return nil, err
	}
	return add, nil
}
func (s ServiceCourse) CreateDiscountCourseOrder(ctx context.Context, in *course.CreateDiscountCourseOrderReq) (*course.CreateDiscountCourseOrderResp, error) {
	add, err := server.CreateDiscountCourseOrder(in)
	if err != nil {
		return nil, err
	}
	return add, nil
}
func (s ServiceCourse) OrderList(ctx context.Context, in *course.OrderListReq) (*course.OrderListResp, error) {
	add, err := server.OrderList(in)
	if err != nil {
		return nil, err
	}
	return add, nil
}
func (s ServiceCourse) OrderPay(ctx context.Context, in *course.OrderPayReq) (*course.OrderPayResp, error) {
	add, err := server.OrderPay(in)
	if err != nil {
		return nil, err
	}
	return add, nil
}
